﻿HmJS.$Import('ui.calendar.DatePicker.Range');
//HmJS.$Import('core.domready');

HmJS.register('demo.module.ui.calendar.datepicker.range', function ($ns) {
	var that = {};

	that.todo = function () {

		var Picker = $ns.ui.Picker;

		var picker = new Picker.Date.Range($$('input[type="text"]'), {
			timePicker: false,
			columns: 3,
			positionOffset: { x: 5, y: 0 }
		});

		var picker2 = new Picker.Date.Range('range_hidden', {
			toggle: $$('#range_select'),
			columns: 3,
			onSelect: function () {
				$('range_text').set('text', Array.map(arguments, function (date) {
					return date.format('%e %B %Y');
				}).join(' - '))
			}
		});

	};

	return that;
});
